From c0dcecc43e36eeb6b10f662c1be760736cd0dbac Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 13 Jan 2026 15:44:43 +0100 Subject: Cleanup old micro pages --- src/pages/micro/[...page].astro | 77 ----------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/pages/micro/[...page].astro (limited to 'src/pages/micro/[...page].astro') diff --git a/src/pages/micro/[...page].astro b/src/pages/micro/[...page].astro deleted file mode 100644 index d11d9ce..0000000 --- a/src/pages/micro/[...page].astro +++ /dev/null @@ -1,77 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from "astro:content"; -import type { GetStaticPaths, Page } from "astro"; -import { Icon } from "astro-icon/components"; -import Note from "@/components/note/Note.astro"; -import Pagination from "@/components/Paginator.astro"; -import PageLayout from "@/layouts/Base.astro"; - -export const getStaticPaths = (async ({ paginate }) => { - const MAX_MICRO_PER_PAGE = 10; - - // Get only Pleroma posts tagged with "micro" - const allMicro = await getCollection("micro", ({ data }) => data.tags?.includes("micro")).catch( - () => [], - ); // Fallback to empty array if micro collection fails - - // Sort all micro posts - const allMicroPosts = allMicro.sort( - (a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime(), - ); - - return paginate(allMicroPosts, { pageSize: MAX_MICRO_PER_PAGE }); -}) satisfies GetStaticPaths; - -interface Props { - page: Page>; - uniqueTags: string[]; -} - -const { page } = Astro.props; - -const meta = { - description: "Read my collection of micro posts", - title: "Micro", -}; - -const paginationProps = { - ...(page.url.prev && { - prevUrl: { - text: "← Previous Page", - url: page.url.prev, - }, - }), - ...(page.url.next && { - nextUrl: { - text: "Next Page →", - url: page.url.next, - }, - }), -}; ---- - - -
-

- Micro - - Browse tags - - - RSS feed - -

-
    - { - page.data.map((note) => ( -
  • - -
  • - )) - } -
- -
-
-- cgit v1.2.3